#include<iostream>

#include<jsoncpp/json/json.h>

using namespace std;

int main()
{
    Json::Value root;
    root["a"] = 1;
    root["b"] = 2;
    root["c"] = 3;

    Json::FastWriter w;
    std::string str = w.write(root);

    std::cout << str << std::endl;

    Json::Reader r;
    Json::Value v;
    r.parse(str, v);
    v["a"].asCString();

    std::cout << v["a"].asInt() << " " << v["b"].asInt() << " " << v["c"].asInt() << std::endl;
    return 0;
}